package com.canton.service.impl;
import com.canton.dao.entity.ClipNode;
import com.canton.dao.repository.ClipRepository;
import com.canton.service.ClipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClipServiceImpl implements ClipService {
    @Autowired
    private ClipRepository clipRepository;
//    @Autowired
//    private GrapeService grapeService;

    @Override
    public ClipNode findByName(String name) {
        return clipRepository.findByName(name);
    }

    @Override
    public List<ClipNode> findAll() {
        return clipRepository.findAll();
    }

    @Override
    public List<ClipNode> findByNameLike(String likes) {
        return clipRepository.findByNameLike(likes);
    }
}
